//
//  GPUImageController.swift
//  ReferenceFunctionDemo
//
//  Created by MACBOOK on 2016/12/19.
//  Copyright © 2016年 刘袭锐. All rights reserved.
//

import UIKit

private let GPUImageCellId = "GPUImageCellId"


class GPUImageController: UITableViewController,mappingable {

    /// 数据数组
    fileprivate lazy var dataArr : [String] = {
        let dataArr = ["美颜照片","美颜相机","美颜直播"]
        return dataArr
    }()
    /// 控制器数组
    fileprivate lazy var classNames : [String] = {
        let classNames = ["GPUimageController","GPUCameraController","GPULiveController"]
        return classNames
    }()
    
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
 
        
    }
   

}


// MARK: - 数据源
extension GPUImageController {
    
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return  dataArr.count
    }
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        
        let cell = UITableViewCell(style: .default, reuseIdentifier: GPUImageCellId)
        cell.textLabel?.text = dataArr[indexPath.row]
        return cell
    }
    
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let vc = mappingableGetViewController(classNames[indexPath.row])
        navigationController?.pushViewController(vc, animated: true)
    }
    
}



